import Vue from 'vue';
import App from './App.vue';

Vue.config.productionTip = false;
/**
 * 自定义渲染函数
 */

let app =null
export default function render({appContent,loading},router,store){
    if(!app) {
        app = new Vue({
            el:'#main',
            router,
            store,
            data(){
                return {
                    appContent,
                    loading
                }
            },
            render(h){
                return h(App,{
                    props:{
                        appContent:this.appContent,
                        loading:this.loading
                    }
                })
            }
        })
    }else {
        app.appContent = appContent
        app.loading = loading
    }
}